Release Notes for 16-Bit Language Tools for MPLAB® IDE
v3.01 (device support version B)
3 August 2007

Table of Contents
  1. Overview
  2. GNU General Public License
  3. Devices Supported
  4. Installation
  5. MPLAB ASM30, MPLAB LINK30 Documentation
  6. What's New in this Release
  7. Migrating to Version 3.0x
  8. Documentation Updates
  9. Fixed Issues
  10. Limitations
  11. Environment Variables Modified
  12. Customer Support


  1. Overview

  2. The 16-Bit language tools consist of an assembler (pic30-as.exe) and a linker (pic30-ld.exe). These tools are sometimes referred to as the "ASM30 Suite". The user's guide describes additional utilities that are not supported by the MPLAB IDE and therefore are not supplied in this release.

  3. GNU General Public License

  4. With the exceptions noted below, the 16-Bit tools are written and distributed under the GNU General Public License (GPL) which means that its source code is freely distributed and available to the public.

    The source for the tools under the GNU GPL may be downloaded separately from the Microchip WWW web page. You may read the GNU GPL in the file named COPYING located the top level of your install directory. A general discussion of principles underlying the GPL may be found at www.gnu.org/copyleft.

    Exceptions to the GNU GPL:

    • pic30-lm
    • pic30-pa
    • sim30

    Support code provided for the header files, linker scripts, and runtime libraries are also exceptions to, and therefore not covered under, the GPL.

  5. Devices Supported

  6. The following dsPIC30 devices are supported:

         dsPIC30F1010  dsPIC30F2010  dsPIC30F3010  dsPIC30F4011  dsPIC30F5011  dsPIC30F6010
                       dsPIC30F2011  dsPIC30F3011  dsPIC30F4012  dsPIC30F5013  dsPIC30F6010A
                       dsPIC30F2012  dsPIC30F3012  dsPIC30F4013  dsPIC30F5015  dsPIC30F6011
                       dsPIC30F2020  dsPIC30F3013                dsPIC30F5016  dsPIC30F6011A
                       dsPIC30F2023  dsPIC30F3014                              dsPIC30F6012
                                                                               dsPIC30F6012A
                                                                               dsPIC30F6013
                                                                               dsPIC30F6013A
                                                                               dsPIC30F6014
                                                                               dsPIC30F6014A
                                                                               dsPIC30F6015
    

    The following PIC24 devices are supported:

         PIC24F04KA200    PIC24F08KA101     PIC24F16KA101     PIC24F32KA101
         PIC24F04KA201    PIC24F08KA102     PIC24F16KA102     PIC24F32KA102
    
         PIC24FJ16GA002   PIC24FJ32GA002
         PIC24FJ16GA004   PIC24FJ32GA004
    
         PIC24FJ48GA002   PIC24FJ64GA002    PIC24FJ96GA006    PIC24FJ128GA006
         PIC24FJ48GA004   PIC24FJ64GA004    PIC24FJ96GA008    PIC24FJ128GA008
                          PIC24FJ64GA006    PIC24FJ96GA010    PIC24FJ128GA010
                          PIC24FJ64GA008                      PIC24FJ128GA106
                          PIC24FJ64GA010                      PIC24FJ128GA108
                          PIC24FJ64GA106                      PIC24FJ128GA110
                          PIC24FJ64GA108
                          PIC24FJ64GA110
    
         PIC24FJ192GA106  PIC24FJ256GA106
         PIC24FJ192GA108  PIC24FJ256GA108
         PIC24FJ192GA110  PIC24FJ256GA110
    
         PIC24FJ64GB106   PIC24FJ128GB106   PIC24FJ192GB106   PIC24FJ256GB106
         PIC24FJ64GB108   PIC24FJ128GB108   PIC24FJ192GB108   PIC24FJ256GB108
         PIC24FJ64GB110   PIC24FJ128GB110   PIC24FJ192GB110   PIC24FJ256GB110
    
    
         PIC24HJ12GP201   PIC24HJ16GP304
         PIC24HJ12GP202
    
         PIC24HJ32GP202   PIC24HJ64GP202    PIC24HJ128GP202   PIC24HJ256GP206
         PIC24HJ32GP204   PIC24HJ64GP204    PIC24HJ128GP204   PIC24HJ256GP210
         PIC24HJ32GP302   PIC24HJ64GP206    PIC24HJ128GP206   PIC24HJ256GP610
         PIC24HJ32GP304   PIC24HJ64GP210    PIC24HJ128GP210
                          PIC24HJ64GP502    PIC24HJ128GP306
                          PIC24HJ64GP504    PIC24HJ128GP310
                          PIC24HJ64GP506    PIC24HJ128GP502
                          PIC24HJ64GP510    PIC24HJ128GP504
                                            PIC24HJ128GP506
                                            PIC24HJ128GP510
    

    The following dsPIC33 devices are supported:

         dsPIC33FJ12GP201   dsPIC33FJ16GP304
         dsPIC33FJ12GP202
    
         dsPIC33FJ32GP202   dsPIC33FJ64GP202    dsPIC33FJ128GP202   dsPIC33FJ256GP506
         dsPIC33FJ32GP204   dsPIC33FJ64GP204    dsPIC33FJ128GP204   dsPIC33FJ256GP510
         dsPIC33FJ32GP302   dsPIC33FJ64GP206    dsPIC33FJ128GP206   dsPIC33FJ256GP710
         dsPIC33FJ32GP304   dsPIC33FJ64GP306    dsPIC33FJ128GP306
                            dsPIC33FJ64GP310    dsPIC33FJ128GP310
                            dsPIC33FJ64GP706    dsPIC33FJ128GP706
                            dsPIC33FJ64GP708    dsPIC33FJ128GP708
                            dsPIC33FJ64GP710    dsPIC33FJ128GP710
                            dsPIC33FJ64GP802    dsPIC33FJ128GP802
                            dsPIC33FJ64GP804    dsPIC33FJ128GP804
    
         dsPIC33FJ12MC201   dsPIC33FJ16MC304
         dsPIC33FJ12MC202
    
         dsPIC33FJ32MC202   dsPIC33FJ64MC202    dsPIC33FJ128MC202   dsPIC33FJ256MC510
         dsPIC33FJ32MC204   dsPIC33FJ64MC204    dsPIC33FJ128MC204   dsPIC33FJ256MC710
         dsPIC33FJ32MC302   dsPIC33FJ64MC506    dsPIC33FJ128MC506
         dsPIC33FJ32MC304   dsPIC33FJ64MC508    dsPIC33FJ128MC510
                            dsPIC33FJ64MC510    dsPIC33FJ128MC706
                            dsPIC33FJ64GP706    dsPIC33FJ128MC708
                            dsPIC33FJ64GP710    dsPIC33FJ128MC710
                            dsPIC33FJ64GP802    dsPIC33FJ128MC802
                            dsPIC33FJ64GP804    dsPIC33FJ128MC804
    

    The following 'virtual' devices are supported:

    • generic-16bit - this device can be used to represent a generic core device (no peripherals of any kind)
  7. Installation

  8. The dsPIC language tools are installed with the MPLAB IDE installer.

  9. MPLAB ASM30, MPLAB LINK30 Documentation

  10. The following documents pertain to the MPLAB ASM30 and MPLAB LINK30, these may be installed as part of the full product or downloaded from Microchip's Web-site:

    • MPLAB ASM30, MPLAB LINK30 and Utilities User's Guide (DS51317)
    • dsPIC30F Language Tools Quick Reference Card (DS51322)

    We refer to these documents throughout this README in somewhat familiar terms.

    Updates to these manuals, that have not made it into (virtual) print, can be found later in this README.

  11. What's New in this Release.

  12. v3.01 (B) Support Update

    This support update to version 3.01 includes 30 new devices PIC24HJ32GP302, PIC24HJ32GP304, PIC24HJ64GP202, PIC24HJ64GP204, PIC24HJ64GP502, PIC24HJ64GP504, PIC24HJ128GP202, PIC24HJ128GP204, PIC24HJ128GP502, PIC24HJ128GP504, dsPIC33FJ32GP302, dsPIC33FJ32GP304, dsPIC33FJ32MC302, dsPIC33FJ32MC304, dsPIC33FJ64GP202, dsPIC33FJ64GP204, dsPIC33FJ64GP802, dsPIC33FJ64GP804, dsPIC33FJ64MC202, dsPIC33FJ64MC204, dsPIC33FJ64MC802, dsPIC33FJ64MC804, dsPIC33FJ128GP202, dsPIC33FJ128GP204, dsPIC33FJ128GP802, dsPIC33FJ128GP804, dsPIC33FJ128MC202, dsPIC33FJ128MC204, dsPIC33FJ128MC802, dsPIC33FJ128MC804

    A customer can determine if this update has been installed by examining the C30 version string. A version string is displayed by executing the following command:

           pic30-as --version
    The version string before update is: (dsPIC30, Microchip v3.01) (A)
    The version string after update is: (dsPIC30, Microchip v3.01) (B)

    v3.01

    This version includes 32 new devices: PIC24F04KA200, PIC24F08KA101, PIC24F16KA101, PIC24F32KA101, PIC24F04KA201, PIC24F08KA102, PIC24F16KA102, PIC24F32KA102, PIC24FJ64GA106, PIC24FJ128GA106, PIC24FJ192GA106, PIC24FJ256GA106, PIC24FJ64GA108, PIC24FJ128GA108, PIC24FJ192GA108, PIC24FJ256GA108, PIC24FJ64GA110, PIC24FJ128GA110, PIC24FJ192GA110, PIC24FJ256GA110, PIC24FJ64GB106, PIC24FJ128GB106, PIC24FJ192GB106, PIC24FJ256GB106, PIC24FJ64GB108, PIC24FJ128GB108, PIC24FJ192GB108, PIC24FJ256GB108, PIC24FJ64GB110, PIC24FJ128GB110, PIC24FJ192GB110, PIC24FJ256GB110

    Linker

    • The definition of output section .text in linker scripts includes a new input section named .init. The new definition is:
        .text :
        {
              *(.init);
              *(.handle);
              *(.libc) *(.libm) *(.libdsp);  /* keep together in this order */
              *(.lib*);
              *(.text);
        } >program
      

    v3.00 (B) Support Update

    This support update to version 3.00 includes 13 new devices PIC24FJ16GA002, PIC24FJ16GA004, PIC24FJ48GA002, PIC24FJ48GA004, PIC24HJ16GP304, PIC24HJ32GP202, PIC24HJ32GP204, dsPIC33FJ16GP304, dsPIC33FJ32GP202, dsPIC33FJ32GP204, 33JF16MC304, dsPIC33FJ32MC202 and dsPIC33FJ32MC204.

    A customer can determine if this update has been installed by examining the C30 version string. A version string is displayed by executing the following command:

           pic30-as --version
    The version string before update is: (dsPIC30, Microchip v3.00) (A)
    The version string after update is: (dsPIC30, Microchip v3.00) (B)

    v3.00

    This release provides a number of enhancements to make accessing the unique features of the dsPIC easier. These are summarized below, with more information available in the accompanying documentation.

    Some highlights:

    • The tool chain supports the new PIC24 and dsPIC33F devices.
    • The tool chain supports new features making working with CodeGuard® easier.

    Assembler

    • The assembler accepts two new section attributes for CodeGuard: boot and secure. These attributes may be applied to sections of type code, bss, psv, and eedata. When applied to a code section, an optional argument may be added to specify entries in the access entry point table. For details see 6.3, "Directives that Define Sections", in the MPLAB ASM30/LINK30 and Utilities User Guide.
    • The assembler provides two new special operators: boot and secure. These operators are provided to get the address of functions in the boot or secure segments, or to transfer control to such functions.
    • New directives have been added for storing ASCII strings in program memory: .pascii, .pasciz, and .pstring. These directives can be used to store character data into all three bytes of each program memory word. Please see Documentation Updates for more details.

    Linker

    • Valid CodeGuard segment sizes and configuration options for all supported devices are initialized. Segment sizes and options may be specified in the IDE Build Options dialog, on the command line, or in source code via FGS, FSS, FBS config word definitions. See 8.8, "Options that Specify CodeGuard Security Features", in the MPLAB ASM30/LINK30 and Utilities User Guide.
    • User-defined boot and secure segments are also supported in program memory and data memory. This allows an application to take advantage of the CodeGuard language extensions on any device, not just CodeGuard enabled devices.
    • The linker collects boot and secure input sections and allocates them according to the options specified.
    • Access entry tables for boot and secure segments are created automatically, if access entry points have been defined in source code.
  13. Migrating to Version 3.0x

  14. Most existing projects can be migrated to MPLAB C30 v3.0x without modification. Minor source code updates may be required to address the following issues.

    • Link failure using MPLAB IDE v7.52

      When using an intermediate directory (selected from the Directories Tab of the Build Options For Project dialogue box) the linker may fail to link correctly if the project contains user generated assembly files. This will be corrected in a later version of MPLAB IDE, for now you may disable the intermediate directory to achieve a successful link

      This has been fixed in MPLAB IDE v7.60.

    • Change to definition of .text in linker scripts

      In the standard linker scripts, output section .text is no longer fixed at address __CODE_BASE. This change was required for CodeGuard support. Existing projects with custom linker scripts will continue to work without modification. However, if CodeGuard boot or secure functions will be added to the project, __CODE_BASE should be removed from the definition of output section .text. For example:
       /*
        ** User Code and Library Code
        **
        ** This section must not be assigned to __CODE_BASE,
        ** because CodeGuard(tm) sections may be located there.
        */
        .text :
        {
              *(.init);
              *(.handle);
              *(.libc) *(.libm) *(.libdsp);  /* keep together in this order */
              *(.lib*);
              *(.text);
        } >program
      
  15. Documentation Updates

    • A new symbol _PROGRAM_END is defined in program memory to mark the highest address used by a CODE or PSV section. This symbol can be used by applications as an end point for checksum calculations.

      For example:

       mov #tblpage(__PROGRAM_END),w0
       mov #tbloffset(__PROGRAM_END),w1
       
       .pword __PROGRAM_END
       .long __PROGRAM_END
         
    • In chapter 9.7.5.1 of the ASM30 manual, "Input Section Description", the second example should read:
         *(EXCLUDE_FILE (*crtend.o *otherfile.o) .ctors)
         
    • Three new assembler directives can be used to store character data into program memory.
      • .pascii "string1"

        stores a sequence of ascii characters (with no automatic trailing zero byte) into program memory, including the upper byte.

      • .pasciz "string2"

        stores a sequence of ascii characters (with an automatic trailing zero byte) into program memory, including the upper byte.

      • .pstring "string2"

        is the same as .pasciz "string2".

  16. Fixed Issues

  17. v3.01

      Assembler

    • BIN30-2/26070 - The .pushsection, .popsection directives are not implemented.
    • BIN30-65 - pic30-as produces incorrect error message (error is correct, message is wrong)
    • The following invalid instruction

        add w0, #52, w0
      

      now correctly reports that operand #2 should be between 0 and 31 inclusive.

    • BIN30-75 - LVD bit definitions missing in the RCON register for the p30f6010.h file
    • BIN30-76 - Incorrect define statement in the peripheral library file - "adc.h" for the dsPIC33F devices
    • BIN30-78 - Improve config macro for more robust section handling
    • BIN30-81 - assembler needs more restrictions on penultimate instruction in DO loops
    • BIN30-82 - Defintion of PMD2 and PMD3 SFR's in the include files for dsPIC33FJ16MC304,dsPIC33FJ32MC202 and dsPIC33FJ32MC204 do not match the datasheet
    • BIN30-83 - Bit 8 of CNEN2 SFR in Pic24HJ32Gp202 does not match the datasheet
    • BIN30-84 - Missing bit defintions for the CNEN2 SFR for PIC24H16GP304 and PIC24HJ32GP204 devices
    • BIN30-88 - For PIC24FJ16GA002, PIC24FJ16GA004 , PIC24FJ48GA002,and PIC24FJ48GA004 bits are defined for PORTA in the .inc files but the datasheet says they should not be defined for these devices
    • BIN30-97 - No error for missing section name
    • The following invalid statement

        .section ,code
      

      is now rejected by the assembler.

    • BIN30-99 - incorrect opcode for "mov #boot(n),Wn"

      This assembler bug may have adversely impacted C applications that utilize pointers to boot or secure functions. The symptom would be an unexpected program reset, possibly dependant on optimization level.

    • Linker

    • BIN30-31 - Some sections are still flagged as relocatable after linking
    • BIN30-43 - User requests symbol for the last location in program memory
    • BIN30-64 - References to OSCCONL AND OSCCONH missing in the dsPIC30F/33F linker scripts
    • BIN30-80 - Link error with ELF, large code model and function pointer to boot or secure access slot

    v3.00

      Assembler

    • BIN30-42 - Unit ID not supported via macros on dsPIC30F devices
    • BIN30-61 - Undefined symbol error for weak symbol when extracted from an archive
    • BIN30-69 - For PIC24FJ32GA002/004 and PIC24FJ64GA002/004, bit 14 ( T1IP2) for the IPC0 SFR is defined in the datasheet, however this bit is not defined in the include files.
    • BIN30-70 - For PIC24FJ32GA002/004 and PIC24FJ64GA002/004, bit 2 (OCM2) of OC1CON and OC3CON SFR is defined in the datasheet, however this bit is not defined in the include files.
    • BIN30-74 - CNInterrupt installed at wrong vector address for SMPS devices
  18. Limitations

  19. The current limitations are as follows:

      Assembler

    • Arguments to the address() section attribute must be even.
    • The default section alignment is 2**1. Therefore the minimum section length is 2 bytes in data memory, and 2 PC units (3 bytes) in program memory.
    • BIN30-3/15741 - The .lcomm directive causes incorrect source line numbers in the assembler listing file.
    • BIN30-5/20016 - Special operators should not accept odd offsets in program memory.
    • BIN30-8/21797 - The .align directive changes section alignment regardless of max-skip.
    • BIN30-10/23306 - The option -g does not work with any section other than .text.
    • BIN30-17/25555 - Cannot generate code for goto $-2.
    • BIN30-22/28477- Unexpected results using .equiv as value for another .equiv.

      The following example is not encoded correctly:

           .equiv var1,root+1
           .equiv var2,var1
           .word var1  ; encodes root+1
           .word var2  ; encodes root
      

      This can happen when the value specified in .equiv is the name of an SFR high byte such as _LATBH, which is defined in the processor include files as an .equiv. The workaround in this case would be to refer to the base register itself, i.e. _LATB+1

    • BIN30-46 - Config Word Names for the _FBS and _FSS macros in the device header files are different for the dsPIC30F devices and PIC24H/dsPIC33F devices
    • BIN30-49 - Bits 8 - 12 for the AD1CON3 are named as SMPI<4:0> in the datasheet however these bits are named as SAMC<4:0> in the .inc files of dsPIC33FJ12GP201/202 and dsPIC33FJ12MC201/202
    • BIN30-52 - Bits 0-4 of the RPINR15 SFR for the dsPIC33FJMC201/202 are spelt as INXDR<4:0> in the datasheet, whereas these bits are spelt as INDXR<4:0> in the .inc file
    • BIN30-53 - Bit Definitions for the PMD3 SFR are in the .inc file of dsPIC33FJ12MC201/202 devices but missing from datasheet.
    • BIN30-101 - Multiple .equs to undefined symbol causes internal error in the assembler

      The following assembly statements will cause a failure:

      .equ foo,bar
      .equ baz,foo
      .word baz
      

      In this example, bar is an undefined symbol, while foo and baz are indirect references to bar. The second level of indirection is causing the failure. The following sequences work fine:

      .equ foo,bar
      .word foo ; one level of indirection
      
      .equ bar,9
      .equ foo,bar
      .equ baz,foo
      .word baz ; two levels of indirection to a literal constant
      
    • Linker

    • BIN30-23/28952 - Multiple definition error with custom linker script

      If a linker script is modified to place the .text section from one object file before all the others, multiple definition errors can result. When this occurs the linker acts as if the section was included twice. The workaround is to specify a full pathname, or *, before the object file name:

                   /*
                   ** User Code and Library Code
                   */
                   .text :
                   {
                      *(.init);
                      *(.handle);
                      *(.libc) *(.libm) *(.libdsp);  /* keep together in
                                                        this order */
                      *(.lib*);
                      myfile.o(.text);   /* this form causes error */
                      *myfile.o(.text);  /* this form works OK */
                      *(.text);
                   } >program
      
    • BIN30-30/25966 - Functions with the address attribute may cause a link error.

      Some addresses will be invalid for the address attribute, notably those that are used for the .handle, .libc, .libm, .libdsp and other .lib sections.

      Addresses that conflict the .text section can be accommodated by modifying the linker script. To modify the linker script, simply remove the .text section from the list of input sections for the output section named .text. For example, it may be modified to read:

                   /*
                   ** User Code and Library Code
                   */
                   .text :
                   {
                      *(.init);
                      *(.handle);
                      *(.libc) *(.libm) *(.libdsp);  /* keep together in
                                                        this order */
                      *(.lib*);
                                                     /* *(.text); */
                   } >program
      
      This will cause the linker to place the .text input sections after satisfying all of the absolute section requirements.

    • BIN30-77 - Not enough contiguous memory for section .const.

      On certain devices, applications with large amounts of auto_psv data may fail to link with this message, even though the total amount of memory used does not exceed the flash capacity. This is because sections .text and .const have each been allocated in large blocks and the PSV page alignment requirement can't be satisfied.

      As a workaround, comment out one line of the linker script as noted above for BIN30-30. This will allow section .text to be allocated in smaller portions, flowing around .const if necessary.

    • BIN30-102 - ELF linker gives erroneous warning when attribute noload is combined with bss

      Note that noload in this case is redundant and can be removed.

    • BIN30-103 - ELF linker may fail when address() attribute is combined with code

      This error can be avoided if another code section is defined in the same file without the address() attribute.

    • BIN30-107 - Linker should report error if boot segment referenced but not defined
    • BIN30-109 - Linker hangs on DMA memory if boot or secure RAM is defined
    • BIN30-110 - Linker allocates boot or secure segment in DMA space
  20. Environment Variables Modified

  21. This installation makes no changes to the way environment variables have been updated previously.

    Modified environment variables are identified as part of the installation procedure and are documented in the manuals.

  22. Customer Support

  23. The Microchip Web Site

    Microchip provides online support via our web site at www.microchip.com. This web site is used as a means to make files and information easily available to customers. Accessible by using your favorite Internet browser, the web site contains the following information:

    • Product Support - Data sheets and errata, application notes and sample programs, design resources, user's guides and hardware support documents, latest software releases and archived software
    • General Technical Support - Frequently Asked Questions (FAQs), technical support requests, online discussion groups, Microchip consultant program member listing
    • Business of Microchip - Product selector and ordering guides, latest Microchip press releases, listing of seminars and events, listings of Microchip sales offices, distributors and factory representatives
    Development Systems Customer Change Notification Service

    Microchip's customer notification service helps keep customers current on Microchip products. Subscribers will receive e-mail notification whenever there are changes, updates, revisions or errata related to a specified product family or development tool of interest.

    To register, access the Microchip web site at www.microchip.com, click on Customer Change Notification and follow the registration instructions.

    The Development Systems product group categories are:

    • Compilers - The latest information on Microchip C compilers and other language tools. These include the MPLAB C18 and MPLAB C30 C compilers; MPASM™ and MPLAB ASM30 assemblers; MPLINK™ and MPLAB LINK30 object linkers; and MPLIB™ and MPLAB LIB30 object librarians.
    • Emulators - The latest information on Microchip in-circuit emulators. This includes the MPLAB REAL ICE™, MPLAB ICE 2000 and MPLAB ICE 4000 in-circuit emulators.
    • In-Circuit Debuggers - The latest information on the Microchip in-circuit debuggers. This includes the MPLAB ICD 2 and PICkit™ 2.
    • MPLAB IDE - The latest information on Microchip MPLAB IDE, the Windows® Integrated Development Environment for development systems tools. This list is focused on the MPLAB IDE, MPLAB IDE Project Manager, MPLAB Editor and MPLAB SIM simulator, as well as general editing and debugging features.
    • Programmers - The latest information on Microchip programmers. These include the MPLAB PM3 and PRO MATE® II device programmers and the PICSTART® Plus, PICkit 1 and PICkit 2 development programmers.
    Additional Support

    Users of Microchip products can receive assistance through several channels:

    • Distributor or Representative
    • Local Sales Office
    • Field Application Engineer (FAE)
    • Technical Support

    Customers should contact their distributor, representative or field application engineer (FAE) for support. Local sales offices are also available to help customers. A listing of sales offices and locations is available on our website.

    Technical support is available through the web site at: http://support.microchip.com